package com.funny.config;

import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Ming
 * @description
 * @fileSimpleName Redisson
 * @fileName com.funny.config.Redisson
 * @date 2024年06月26日 10:38
 */
@Configuration
public class RedissonFactory {

    @Bean
    public Redisson redisson() {
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.31.123:6379").setDatabase(0);
        return (Redisson) Redisson.create(config);
    }
}
